<?php
class register_model extends CI_Model{
	function __construct()
	{
		parent::__construct();
		$this->load->database('azindia_client');
	}

	function register($data)
	{
		//print_r($data);exit;
		$query = $this->db->insert('users', $data);
		return $query;
		//echo $this->db->last_query();exit;
	}
	function checkemail($email)
	{
		if($query = $this->db->get_where('users',  array('email'=>$email))->num_rows())
		{
		//print_r($query);exit;
		return 0;
		}else
		{
			return 1;
		}
	}
	function getstates()
	{
		$query = $this->db->get('states');
		//print_r($query->result());exit;
		return $query->result();
	}
}	